package com.common.shared.map;

import java.util.ArrayList;

import com.google.gwt.user.client.rpc.IsSerializable;

public class GisLayer implements IsSerializable {

	private int id;
	private int gismap_id;
	private GisMap map;
	private String layername;
	private String title;
	private boolean iswms;
	private int priority;
	private boolean baselayer;
	private int gmaptype;
	private boolean sphericalmercator;
	private String wmsurl;
	private ArrayList<GisLayerOptions> gisLayerOptions = new ArrayList<GisLayerOptions>();
	private ArrayList<GisLayerFilter> gisLayerFilters = new ArrayList<GisLayerFilter>();
	private boolean showinmap;
	private String form_defination_xml;
	private String button_icon;
	private String button_title;
	private boolean can_delete;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getGismap_id() {
		return gismap_id;
	}

	public void setGismap_id(int gismap_id) {
		this.gismap_id = gismap_id;
	}

	public GisMap getMap() {
		return map;
	}

	public void setMap(GisMap map) {
		this.map = map;
	}

	public String getLayername() {
		return layername;
	}

	public void setLayername(String layername) {
		this.layername = layername;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public boolean isIswms() {
		return iswms;
	}

	public void setIswms(boolean iswms) {
		this.iswms = iswms;
	}

	public int getPriority() {
		return priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	public boolean isBaselayer() {
		return baselayer;
	}

	public void setBaselayer(boolean baselayer) {
		this.baselayer = baselayer;
	}

	public int getGmaptype() {
		return gmaptype;
	}

	public void setGmaptype(int gmaptype) {
		this.gmaptype = gmaptype;
	}

	public boolean isSphericalmercator() {
		return sphericalmercator;
	}

	public void setSphericalmercator(boolean sphericalmercator) {
		this.sphericalmercator = sphericalmercator;
	}

	public String getWmsurl() {
		return wmsurl;
	}

	public void setWmsurl(String wmsurl) {
		this.wmsurl = wmsurl;
	}

	public ArrayList<GisLayerOptions> getGisLayerOptions() {
		return gisLayerOptions;
	}

	public void setGisLayerOptions(ArrayList<GisLayerOptions> gisLayerOptions) {
		this.gisLayerOptions = gisLayerOptions;
	}

	protected Object cloneObject() {
		GisLayer result = new GisLayer();
		result.id = id;
		result.gismap_id = gismap_id;
		result.layername = layername;
		result.title = title;
		result.iswms = iswms;
		result.priority = priority;
		result.baselayer = baselayer;
		result.gmaptype = gmaptype;
		result.sphericalmercator = sphericalmercator;
		result.wmsurl = wmsurl;
		result.showinmap = showinmap;
		ArrayList<GisLayerOptions> gisLayerOptions = new ArrayList<GisLayerOptions>();
		for (GisLayerOptions gisLayerOption : this.gisLayerOptions) {
			gisLayerOptions.add((GisLayerOptions) gisLayerOption.cloneObject());
		}
		result.gisLayerOptions = gisLayerOptions;
		return result;
	}

	public boolean isShowinmap() {
		return showinmap;
	}

	public void setShowinmap(boolean showinmap) {
		this.showinmap = showinmap;
	}

	public ArrayList<GisLayerFilter> getGisLayerFilters() {
		return gisLayerFilters;
	}

	public void setGisLayerFilters(ArrayList<GisLayerFilter> gisLayerFilters) {
		this.gisLayerFilters = gisLayerFilters;
	}

	public String getForm_defination_xml() {
		return form_defination_xml;
	}

	public void setForm_defination_xml(String form_defination_xml) {
		this.form_defination_xml = form_defination_xml;
	}

	public String getButton_icon() {
		return button_icon;
	}

	public void setButton_icon(String button_icon) {
		this.button_icon = button_icon;
	}

	public String getButton_title() {
		return button_title;
	}

	public void setButton_title(String button_title) {
		this.button_title = button_title;
	}

	public boolean isCan_delete() {
		return can_delete;
	}

	public void setCan_delete(boolean can_delete) {
		this.can_delete = can_delete;
	}
}
